package com.ckzp.jfinal.weixin.impl;

import com.ckzp.weixin.service.MessageAction;
import com.ckzp.weixin.service.ServiceRequest;
import com.ckzp.weixin.service.ServiceResponse;
import com.ckzp.weixin.service.response.TextResponse;

/**
 * Created by 51594 on 2023/4/6.
 */
public class VoiceAction implements MessageAction {
    /**
     * @param request
     * @return
     */
    public ServiceResponse doAction(ServiceRequest request) {
        if (request != null) {
            String wx_openid = request.getFromUserName();
            TextResponse response = TextResponse.init(request);
            response.setContent(request.getRecognition());
            return response;
        }
        return null;
    }
}
